function showBackgroundBDBDEC(elts, settings, callback) 
{
	elts.bg.css({opacity:0}).fadeTo(10,0.75,callback);
}

function hideBackgroundBDBDEC(elts, settings, callback) {
	elts.bg.css({opacity:0}).fadeTo(10,0.75,callback);
}

function showContentBDBDEC(elts, settings, callback) {
		elts.contentWrapper
			.css({
				marginTop: settings.marginTop+'px',
				marginLeft: settings.marginLeft+'px',
				height: settings.height+'px',
				width: settings.width+'px',
				opacity: 0
			})
			.show(100,callback);
		
}

function hideContentBDBDEC(elts, settings, callback) {
	elts.contentWrapper.hide(100,callback);
}

function callbackElement (elts, settings)
{
	$('select.'+settings.typeElement+'List').addOption(settings.idElement,settings.nameElement);
}

$(document).ready(function()
{
	$('.openModal').nyroModal({
			showBackground: showBackgroundBDBDEC,
			hideBackground: hideBackgroundBDBDEC,
			showContent: showContentBDBDEC,
			hideContent: hideContentBDBDEC,
			bgColor: '#cfe3ef',
			css: { 
				bg: {
				  zIndex: 100,
				  position: 'fixed',
				  top: 0,
				  left: 0,
				  height: '100%',
				  width: '100%'
				},
				wrapper: {
				  zIndex: 101,
				  position: 'fixed',
				  top: '50%',
				  left: '50%',
				  paddingLeft : '20px',
				  paddingRight : '20px'
				},
				wrapper2: {
				},
				content: {
				  overflow: 'hidden'
				},
				loading: {
				  zIndex: 102,
				  position: 'fixed',
				  top: '50%',
				  left: '50%',
				  marginTop: '-50px',
				  marginLeft: '-50px'
				}
			  }
	});
}); 

